<template>
  <div>
    <div class="title">机构信息</div>
    <div style="width:600px; border: 1px solid #Eaeaea; padding: 10px;">
      <el-form :data="formData" label-width="80px">
        <el-row :gutter="30">
          <el-col>
            <div style="line-height: 30px;">
              <span style="font-weight: bold; font-size: 26px;"> {{formData.title}}</span>
            </div>
          </el-col>
          <el-col>
            <div style="line-height: 30px;">
              <span style="font-weight: bold;">机构编码: </span><span> {{formData.schcode}}</span>
            </div>
          </el-col>
          <el-col>
            <div style="line-height: 30px;">
              <span style="font-weight: bold;">联&nbsp;系 &nbsp; 人: </span><span> {{formData.manager}}</span>
            </div>
          </el-col>

          <el-col>
            <div style="line-height: 30px;">
              <span style="font-weight: bold;">联系电话: </span><span> {{formData.mobile}}</span>
            </div>
          </el-col>

          <el-col>
            <div style="line-height: 30px;">
              <span style="font-weight: bold;">联系地址: </span><span> {{formData.address}}</span>
            </div>
          </el-col>

          <el-col>
            <div style="line-height: 30px;">
              <span style="font-weight: bold;">机构简介: </span><span> {{formData.desc}}</span>
            </div>
          </el-col>
        </el-row>
      </el-form>
    </div>

    <div style="margin-top: 20px;">
      <div class="title">系统信息</div>
      <div style="width:600px; border: 1px solid #Eaeaea; padding: 10px;">
          <el-row>
            <el-col>
              <div style="line-height: 30px;">
                <span style="font-weight: bold;">系统版本: </span><span> 小谷助教旗舰版</span>
              </div>
            </el-col>
            <el-col>
              <div style="line-height: 30px;">
                <span style="font-weight: bold;">版本号: </span><span> v3.2.14</span>
              </div>
            </el-col>
            <el-col>
              <div style="line-height: 30px;">
                <span style="font-weight: bold;">注册时间: </span><span> {{formData.regdate}}</span>
              </div>
            </el-col>
            <el-col>
              <div style="line-height: 30px;">
                <span style="font-weight: bold;">到期时间: </span><span> {{formData.expdate}}</span>
              </div>
            </el-col>
          </el-row>
      </div>
    </div>

  </div>
</template>

<script>
  export default {
    data() {
      return {
        formData: {
          ogcode: '',
          logo: '',
          title: '',
          desc: '',
          address: '',
          mobile: '',
          regdate: '',
        }
      }
    },
    created() {
      this.loadData();
    },
    methods: {
      loadData() {
        this.api_helper.post("/api/admin/system/basic/info").then(res => {
          if (res.status == 200 && res.data.code == 1) {
            this.formData = res.data.data;
          }
        })
      },
      handleSave() {
        var params = {
          ogcode: this.formData.ogcode,
          title: this.formData.title,
          master: this.formData.master,
          desc: this.formData.desc,
          address: this.formData.address,
          mobile: this.formData.mobile
        };

        api_helper.post("api/admin/system/basic/update", params).then(res => {
          if (res.status == 200 && res.data.code == 1) {
            this.$message.success({
              message: res.data.msg,
              duration: 1500,
              showClose: true
            });
          }
        })


      }
    }

  }
</script>

<style>
</style>
